cmake_minimum_required(VERSION 2.6)
PROJECT(Base)

AUX_SOURCE_DIRECTORY(./ SRC)
AUX_SOURCE_DIRECTORY(./pb/protocol SRC_PROTOCOL)
AUX_SOURCE_DIRECTORY(./jsoncpp SRC_JSONCPP)
AUX_SOURCE_DIRECTORY(./log4z SRC_LOG)

SET(LIBRARY_OUTPUT_PATH .)
#SET(EXECUTABLE_OUTPUT_PATH  ./bin)


ADD_DEFINITIONS( -g -W -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DAC_HAS_INFO
-DAC_HAS_WARNING -DAC_HAS_ERROR -DAC_HAS_CRITICAL -DTIXML_USE_STL
-DAC_HAS_DEBUG -DLINUX_DAEMON -std=c++11)

INCLUDE_DIRECTORIES(./ ./jsoncpp ./pb/protocol ./log4z /usr/local/protobuf/include)
#LINK_DIRECTORIES(./ ${PB_LIB_DIR} ./slog/lib)

ADD_LIBRARY(base STATIC ${SRC} ${SRC_PROTOCOL} ${SRC_JSONCPP} ${SRC_LOG})

TARGET_LINK_LIBRARIES(base pthread crypto)
#install(TARGETS base DESTINATION lib)
